﻿using DotNetty.Buffers;
using DotNetty.Codecs;
using DotNetty.Transport.Channels;
using System;
using System.Collections.Generic;
using System.Text;

namespace EmbededChannelTest
{
    public class ToIntDecoder2 : ReplayingDecoder<int>
    {
        public ToIntDecoder2(int initialState) : base(initialState)
        {
        }

        protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List<object> output)
        {
            output.Add(input.ReadInt());
        }
    }
}
